
Imports org.model.lib.Model
Imports org.codegen.win.controls
Imports org.model.lib.db
Imports org.model.lib.db.DBUtils

Namespace My
    ''' <summary>
    ''' Returns a DBUtils instance from the connection string stored in the registry.
    ''' <seealso cref="DBConfig"></seealso>
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ClaimsDBUtilsProvider
        Implements IDBUtilsProvider

        Public Function getDBUtils() As DBUtils Implements IDBUtilsProvider.getDBUtils

            Dim connString As String = String.Empty

            If My.Application.CurrentDatabase = "AIGIS" Then connString = My.Application.AIGISDatabase
            If My.Application.CurrentDatabase = "AKRITAS" Then connString = My.Application.AKRITASDatabase

            Dim sqlConnType As enumConnType = enumConnType.CONN_MSSQL
            Dim iDialect As enumSqlDialect = enumSqlDialect.MSSQL

            Return DBUtils.getFromConnString(connString, sqlConnType, iDialect)

        End Function

    End Class
End Namespace
